<?php if (!defined('THINK_PATH')) exit(); /*a:1:{s:76:"/var/www/html/CRM/public/../application/admin/view/advisory/connoisseur.html";i:1541147170;}*/ ?>
﻿<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>咨询部</title>
<link rel="stylesheet" type="text/css" href="/admin/css/css.css" />
	<script type="text/javascript" src="/admin/js/jquery.min.js"></script>
	<!--<script type="text/javascript" src="/admin/js/laydate.js"></script>-->
	<script type="text/javascript" src="/admin/layer/layer.js"></script>
	<script type="text/javascript" src="/admin/laydate/laydate.js"></script>
</head>
<style>
     .vsAdd{
		 display: inline-block;
		 width: 70px;
		 height: 25px;
		 border-radius:8px;
		 background-color: #2a9cdd;
		 line-height: 25px;
		 color: #fff;
		 cursor: pointer;
		 text-align: center;
	 }
	 .vsGdd{
		 display: inline-block;
		 width: 70px;
		 height: 25px;
		 border-radius:8px;
		 background-color: #C9C5C5;
		 line-height: 25px;
		 color: #fff;
		 cursor: pointer;
		 text-align: center;
	 }
	 .submit{
		 display: inline-block;
		 border: none;
		 outline: none;
		 width: 50px;
		 height: 30px;
		 border-radius: 35%;
		 background-color: #cccccc;
		 line-height: 25px;
		 color: #fff;
		 cursor: pointer;
		 text-align: center;
	 }
	 .list{
		 margin-top: 25px;
		 width: 230px;
		 float: left;
	 }
	 .clear{
		 clear: both;
	 }
	 .td{
		height: 40px;
	 }
	 .imgv{
		 vertical-align: middle;
	 }
	 .list>p{
		 margin: 5px 0;
	 }
/*分页样式*/
	 .pagination>li{
		 float: left;
		 text-align: center;
		 border-radius: 5px;
	 }
	 .pagination>li:hover{
		 background-color: #47a4e1;
	 }
	 .pagination>li:hover>span{
		 color: white;
	 }
	 .pagination>li>a{
		 display: inline-block;
		 width: 66px;
		 line-height: 2rem;
		 border-radius: 5px;
		 border: 1px solid #CCCCCC;
	 }
	 .pagination>li>span{
		 display: inline-block;
		 width: 66px;
		 line-height: 2rem;
		 color: #47a4e1;
		 font-weight: bold;
		 font-size: 18px;
	 }
	 .pagination>li.disabled{
		 border-radius: 5px;
		 border: 1px solid #CCCCCC;
	 }
	 .pagination{
		 width:auto;
		 height: 100%;
		 margin: 0 auto;
	 }

</style>
<body>
	<div id="pageAll">
		<div class="pageTop">
			<div class="page">
				<img src="/admin/img/coin02.png" /><span><a href="#">首页</a>&nbsp;-&nbsp;<a
					href="#">咨询部</a>&nbsp;-</span>&nbsp;咨询部
			</div>
		</div>

		<div class="page">
			<!-- banner页面样式 -->
			<div class="connoisseur">
				<div class="conform">
					<form action="<?php echo url('admin/advisory/monthfind'); ?>">
						<div class="cfD" style="float: left" >
							当前月份：<select class="bselect" name="month" onchange="getmonth(value)">
							<option value="">请选择月份</option>
                            <option value="1">一月份</option>
                            <option value="2">二月份</option>
                            <option value="3">三月份</option>
                            <option value="4">四月份</option>
                            <option value="5">五月份</option>
                            <option value="6">六月份</option>
                            <option value="7">七月份</option>
                            <option value="8">八月份</option>
                            <option value="9">九月份</option>
                            <option value="10">十月份</option>
                            <option value="11">十一月份</option>
                            <option value="12">十二月份</option>
                        </select>
						</div>
						<!--<input type="submit" autocomplete="off" value="筛选" class="vsAdd">-->
					</form>
						<div class="cfD" style="float: left;">
							<form action="<?php echo url('admin/advisory/advisory'); ?>">
							筛选开始时间：<input autocomplete="off" class="vinput laydate-icon" name="start" type="text" id="start"/>&nbsp;&nbsp;&nbsp;-&nbsp;&nbsp;&nbsp;筛选截止时间：
							<input class="vinput"  autocomplete="off" laydate-icon" name="end" type="text" id="end"/>
								&nbsp;&nbsp;&nbsp;&nbsp;
								<input type="submit" value="OK" class="submit">
							</form>
						</div>
                    </form>
					<div style="clear: both"></div>
					<form>
						<div class="cfD">
							<?php if(is_array($inter) || $inter instanceof \think\Collection || $inter instanceof \think\Paginator): $i = 0; $__LIST__ = $inter;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$vo): $mod = ($i % 2 );++$i;?>
							<div  id="list" style="float: left">
								<p style="float: left;width: 250px">
									<span><?php echo $vo['0']['user_name']; ?>当月咨询人数：</span><span><?php echo $vo['0']['init_num']; ?></span>
								</p><br/>
								<p style="float: left;width: 250px">
									<span><?php echo $vo['1']['user_name']; ?>当月试岗人数：</span><span><?php echo $vo['1']['try_num']; ?></span>
								</p><br/>
								<p style="float: left;width: 250px">
									<span><?php echo $vo['2']['user_name']; ?>当月签单人数：</span><span><?php echo $vo['2']['order_num']; ?></span>
								</p><br/>
							</div>
							<?php endforeach; endif; else: echo "" ;endif; ?>
							<div class="clear"></div>
						</div>
					</form>
				</div>
				<!-- banner 表格 显示 -->
				<div class="conShow">
					<table border="1" cellspacing="0" cellpadding="0">
						<tr>
							<td width="66px" class="tdColor tdC">序号</td>
							<td width="135px" class="tdColor" name="job_name">姓名</td>
							<td width="120px" class="tdColor" name="job_sex">性别</td>
							<td width="130px" class="tdColor" name="job_phone">联系电话</td>
							<td width="140px" class="tdColor" name="job_order_time">签单时间</td>
							<td width="145px" class="tdColor" name="job_borrow_time">贷款时间</td>
							<td width="150px" class="tdColor" name="job_broow_name">贷款机构</td>
							<td width="140px" class="tdColor" name="job_sort">等级分类</td>
							<td width="130px" class="tdColor" name="job_inter_time">面试时间</td>
							<td width="130px" class="tdColor" name="job_apply_sn">是否办理</td>
							<td width="130px" class="tdColor" name="job_try_sn">是否试岗</td>
							<td width="130px" class="tdColor" name="job_getout_sn">是否离开</td>
							<td width="130px" class="tdColor" name="job_resume">简历</td>
							<td width="250px" class="tdColor">操作</td>
						</tr>
						<?php if(is_array($result) || $result instanceof \think\Collection || $result instanceof \think\Paginator): $i = 0; $__LIST__ = $result;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$vo): $mod = ($i % 2 );++$i;?>
						<tr>
							<td class="td"><?php echo $key+1; ?></td>
							<td class="td"><?php echo $vo['job_name']; ?></td>
							<td class="td"><?php echo $vo['job_sex']; ?></td>
							<td class="td"><?php echo $vo['job_phone']; ?></td>
							<td class="td"><?php echo date("Y-m-d",$vo['job_order_time']); ?></td>
							<td class="td"><?php echo $vo['job_borrow_time']; ?></td>
							<td class="td"><?php echo $vo['job_broow_name']; ?></td>
							<td class="td"><?php echo $vo['job_sort']; ?></td>
							<td class="td"><?php echo date("Y-m-d",$vo['job_inter_time']); ?></td>
							<td class="td"><?php echo $vo['job_apply_sn']; ?></td>
							<td class="td"><?php echo $vo['job_try_sn']; ?></td>
							<td class="td">
								<?php if($vo['job_getout_sn'] == 0): ?>
								<a onClick="member_stop(this,'<?php echo $vo['job_id']; ?>')" href="javascript:" title="修改"
								   class="vsGdd"><label><?php echo $vo['job_getout_sn']; ?></label></a>
								<?php else: ?>
								<a style="text-decoration:none" class="vsAdd" onClick="member_start(this,'<?php echo $vo['job_id']; ?>')" href="javascript:" title="启用"><label><?php echo $vo['job_getout_sn']; ?></label></a>
								<?php endif; ?>
							</td>
							<td>
								<?php if($vo['job_resume_pdf']==''): ?>
								<a class="word" href="javascript:;">
									<img src="/admin/img/document-word.png" alt="简历"/>
								</a>
								<?php else: ?>
								<a target="_blank" href="<?php echo url('admin/excelud/pdf_preview'); ?>?pdf_name='<?php echo $vo['job_id']; ?>'">
								<img src="/admin/img/document-word-tick.png" alt="简历"/></a>
								<?php endif; ?>
							</td>

							<td class="td"><a href="<?php echo url('admin/advisory/adviupdate',['id'=>$vo['job_id']]); ?>" class="vsAdd">修改</a>
								<a class="vsAdd"  href="javascript:;" onclick="detaile(id=<?php echo $vo['job_id']; ?>)">查看详情</a>
							</td>
						</tr>
						<?php endforeach; endif; else: echo "" ;endif; ?>
					</table>

					<!--<div class="paging">此处是分页</div>-->
				</div>
				<!-- banner 表格 显示 end-->
			</div>
			<!-- banner页面样式end -->
		</div>

	</div>

	<!-- 删除弹出框 -->
	<div class="banDel">
		<div class="delete">
			<div class="close">
				<a><img src="/admin/img/shanchu.png" /></a>
			</div>
			<p class="delP1">你确定要删除此条记录吗？</p>
			<p class="delP2">
				<a href="#" class="ok yes">确定</a><a class="ok no">取消</a>
			</p>
		</div>
	</div>
	<!-- 删除弹出框  end-->
</body>

<script type="text/javascript">
// 广告弹出框
$(".delban").click(function(){
  $(".banDel").show();
});
$(".close").click(function(){
  $(".banDel").hide();
});
$(".no").click(function(){
  $(".banDel").hide();
});
// 广告弹出框 end
</script>
<script type="text/javascript">
    !function(){
        laydate.skin('molv');//切换皮肤，请查看skins下面皮肤库
        laydate({elem: '#demo'});//绑定元素
    }();

    //日期范围限制
    var start = {
        elem: '#start',
        format: 'YYYY-MM-DD',
        min: '1990-01-01', //设定最小日期为当前日期
        max: '2099-06-16', //最大日期
        istime: true,
        istoday: false,
        choose: function(datas){
            end.min = datas; //开始日选好后，重置结束日的最小日期
            end.start = datas //将结束日的初始值设定为开始日
        }
    };

    var end = {
        elem: '#end',
        format: 'YYYY-MM-DD',
        min: '1990-01-01',
        max: '2099-06-16',
        istime: true,
        istoday: false,
        choose: function(datas){
            start.max = datas; //结束日选好后，充值开始日的最大日期
        }
    };
    laydate(start);
    laydate(end);

    //自定义日期格式
    laydate({
        elem: '#test1',
        format: 'YYYY年MM月DD日',
        festival: true, //显示节日
        choose: function(datas){ //选择日期完毕的回调
            alert('得到：'+datas);
        }
    });

    //日期范围限定在昨天到明天
    laydate({
        elem: '#hello3',
        min: laydate.now(-1), //-1代表昨天，-2代表前天，以此类推
        max: laydate.now(+1) //+1代表明天，+2代表后天，以此类推
    });
</script>
<script>
    function detaile(id){
        layer.open({
            type:2,
            area: ['700px', '450px'],
            fixed: false, //不固定
            maxmin: true,
            content: "<?php echo url('admin/advisory/test'); ?>?job_id="+id,
        });
    }
    
    function getmonth(value) {
        window.location.href="<?php echo url('admin/advisory/monthfind'); ?>?month="+value;
//		console.log(value);
//		$.get("<?php echo url('admin/advisory/monthfind'); ?>",{'month':value},function (data) {
////			   console.log(data);
//               console.log(data.inter);
//			   if (data.msg==200){
//                   var str = '';
//			       for(var i=0;i<data.names.length;i++){
//                      console.log(data.inter[data.names[i]][0]);
//				      console.log(data.inter[data.names[i]][1]);
//				      console.log(data.inter[data.names[i]][2]);
//					      str +=  '<div style="float: left;width: 250px">';
//                          str +='<p style="float: left;width: 250px"><span>咨询师'+data.names[i]+'当月咨询人数：</span><span>'+data.inter[data.names[i]][0]['init_num']+'</span></p>';
//                          str +='<p style="float: left;width: 250px"><span>咨询师'+data.names[i]+'当月试岗人数：</span><span>'+data.inter[data.names[i]][1]['try_num']+'</span></p>';
//                          str +='<p style="float: left;width: 250px"><span>咨询师'+data.names[i]+'当月签单人数：</span><span>'+data.inter[data.names[i]][2]['order_num']+'</span></p>';
//                          str +='</div>';
//                          $('#list').html(str);
//				   }
//			   }else{
//                   for(var i=0;i<data.names.length;i++){
//                       str += '<div style="float: left;width: 250px">';
//                       str +='<p style="float: left;width: 250px"><span>咨询师'+data.names[i]+'当月咨询人数：</span><span>0</span></p>';
//                       str +='<p style="float: left;width: 250px"><span>咨询师'+data.names[i]+'当月试岗人数：</span><span>0</span></p>';
//                       str +='<p style="float: left;width: 250px"><span>咨询师'+data.names[i]+'当月签单人数：</span><span>0</span></p>';
//                       str += '</div>';
//                       $('#list').html(str);
//                   }
//			   }
//        },'json')
    }


	/*是否离开-离开*/
    function member_stop(obj,id) {
        layer.confirm('确认要选择离开吗？', function () {
            $.get("<?php echo url('admin/advisory/ban'); ?>",{'id':id},function (data) {
                if(data.msg == 200){
//					layer.msg('已停用!', {icon: 5, time: 1000});
                    location.reload();
                }
            },'json')
        });
    }
	/*是否离开-在读*/
    function member_start(obj,id) {
        layer.confirm('确认要选择在读吗？', function () {
            $.get("<?php echo url('admin/advisory/ban'); ?>",{'id':id},function (data) {
                if (data.msg==200){
//					layer.msg('已启用!', {icon: 6, time: 1000});
                    location.reload();
                }
            },'json')
        });
    }

</script>
<script>
//	$(".vsGdd").each(function(){
//	   $(this).click(function(){
//		if($(this).html()=="<label>离开</label>"){
//			$(this).html()=="<label>在读</label>";
//			$(this).css("background-color","#2a9cdd");	
//	
//		}else{
//			$(this).html()=="<label>离开</label>";
//			$(this).css("background-color","#C9C5C5");	
//		}
//	   });
//	});
</script>	
</html>